#ifndef __PRINTSYSLOG__
#define __PRINTSYSLOG__
#include <syslog.h>
#include <func.h>
#include "ds.h"
typedef struct
{
    char ip[16];
    uint16_t port;
    time_t connect_time;
} ClientInfo;
int printServerLogs(char *ip_str, uint16_t client_port, char *cmd);
#define PRINT_LOG(ip_str, client_port, cmd)  {FILE *pfile = fopen("/var/log/syslog", "a"); fprintf(pfile, "line:%d, function:%s, file:%s\n", __LINE__, __FUNCTION__, __FILE__); printServerLogs(ip_str, client_port, cmd); fclose(pfile);}

#endif